package com.hsjk.szwj.module.train.dal.mysql.student;

import com.hsjk.szwj.framework.common.pojo.PageResult;
import com.hsjk.szwj.framework.mybatis.core.mapper.BaseMapperX;
import com.hsjk.szwj.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminStudentPageReqVO;
import com.hsjk.szwj.module.train.dal.dataobject.student.StudentInfoDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.Arrays;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/09/04 23:58
 **/
@Mapper
public interface IStudentInfoMapper extends BaseMapperX<StudentInfoDO> {
    default PageResult<StudentInfoDO> selectPage(AdminStudentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<StudentInfoDO>()
                .orderByDesc(Arrays.asList(StudentInfoDO::getCreateTime, StudentInfoDO::getCreateTime)));
    }
}
